<template>
  <div class="residentBox">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <h3>图片管理</h3>
      </div>
      <div class="box-select">
        <span>广告类型</span>
        <el-select v-model="type" clearable placeholder="请选择">
          <el-option
            v-for="item in seleceList"
            :key="item.id"
            :label="item.name"
            :value="item.id"
          >
          </el-option>
        </el-select>
        <el-button type="primary">查询</el-button>
      </div>
    </el-card>
    <div class="btn">
      <el-button type="primary">添加</el-button>
      <el-button type="danger">批量删除</el-button>
    </div>
    <el-table
      border
      :data="tableData"
      @selection-change="handleSelectionChange"
      style="width: 100%"
    >
      <el-table-column type="selection" width="55"> </el-table-column>
      <el-table-column prop="date" label="日期"> </el-table-column>
      <el-table-column prop="name" label="姓名"> </el-table-column>
      <el-table-column prop="address" label="地址"> </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      seleceList: {
        id: "1",
        name: "2",
      },
      tableData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1517 弄",
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1519 弄",
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1516 弄",
        },
      ],
    };
  },
  methods: {
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
  },
};
</script>
<style lang="less" scoped>
.residentBox {
  .box-select {
    display: flex;
    align-items: center;
    span {
      margin-right: 16px;
    }
  }
  .box-card {
    padding-bottom: 20px;
    .item {
      float: left;
      :nth-child(2) {
        width: 180px;
        margin-left: 10px;
      }
      :nth-child(3) {
        margin-left: 30px;
        margin-right: 10px;
      }
    }
    .el-select {
      float: left;
    }
    .el-button {
      margin-left: 30px;
      width: 100px;
    }
  }
  .btn {
    margin-top: 14px;
    .el-button {
      width: 100px;
    }
  }
  .el-table {
    margin-top: 16px;
    .el-table-column {
      text-align: center;
    }
  }
  .el-pagination {
    margin-top: 8px;
    margin-left: 30%;
  }
}
</style>